﻿#ifndef SWANLINK_FINANCE_CARDSENDER_ADAPTOR_F5G006_LIB_LIBF5G006_INCLUDE_STRING_UTILS
#define SWANLINK_FINANCE_CARDSENDER_ADAPTOR_F5G006_LIB_LIBF5G006_INCLUDE_STRING_UTILS

#include <string>
#include <memory>

void stringAppendV(std::string& buf, const char* fmt, va_list args);
void stringAppendF(std::string& buf, const char* fmt, ...);

std::unique_ptr<std::string> stringFormatV(const char* fmt, va_list args);
std::unique_ptr<std::string> stringFormat(const char* fmt, ...);

std::unique_ptr<std::string> bytesToHexString(const uint8_t* data, int count);
std::unique_ptr<std::string> bytesToPrintableString(const uint8_t* data, int count);

std::unique_ptr<std::string> formatSystemError(long long err_code);

#endif  // SWANLINK_FINANCE_CARDSENDER_ADAPTOR_F5G006_LIB_LIBF5G006_INCLUDE_STRING_UTILS

